<a href="http://github.com/angular/angular.js/edit/master/docs/content/error/injector/pget.ngdoc" class="improve-docs btn btn-primary"><i class="icon-edit"> </i> Improve this doc</a><h1><code ng:non-bindable="">Provider Missing $get</code>
<div><span class="hint">error in component <code ng:non-bindable="">$injector</code>
</span>
</div>
</h1>
<div><pre class="minerr-errmsg" error-display="Provider '{0}' must define $get factory method.">Provider '{0}' must define $get factory method.</pre>
<h2 id="description">Description</h2>
<div class="description"><div class="-injector-page -injector-pget-page"><p>This error occurs when attempting to register a provider that does not have a
<code>$get</code> method. For example:</p>
<pre><code>function BadProvider() {} // No $get method!
angular.module(&quot;myApp&quot;, [])
  .provider(&#39;bad&#39;, BadProvider);  // this throws the error</code></pre>
<p>To fix the error, fill in the <code>$get</code> method on the provider like so:</p>
<pre><code>function GoodProvider() {
  this.$get = angular.noop;
}
angular.module(&quot;myApp&quot;, [])
  .provider(&#39;good&#39;, GoodProvider);</code></pre>
<p>For more information, refer to the <a href="api/AUTO.$provide#methods_provider"><code>$provide.provider</code></a> api doc.</p>
</div></div>
</div>
